﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace Yatagan.BaseAspects
{
    public class MethodExecutionEventArgs : PostSharp.Laos.InstanceBoundLaosEventArgs
    {
        PostSharp.Laos.MethodExecutionEventArgs _eventArgs;

        public MethodExecutionEventArgs(PostSharp.Laos.MethodExecutionEventArgs eventArgs, object instance) : base(instance)
        {
            _eventArgs = eventArgs;
        }

        public Exception Exception 
        {
            get { return _eventArgs.Exception; }
            set { _eventArgs.Exception = value; }
        }

        public PostSharp.Laos.FlowBehavior FlowBehavior 
        {
            get { return _eventArgs.FlowBehavior; }
            set { _eventArgs.FlowBehavior = value; }
        }

        public MethodBase Method 
        {
            get { return _eventArgs.Method; } 
        }
        
        public object MethodExecutionTag 
        {
            get { return _eventArgs.MethodExecutionTag; }
            set { _eventArgs.MethodExecutionTag = value; }
        }

        public object ReturnValue 
        {
            get { return _eventArgs.ReturnValue; }
            set { _eventArgs.ReturnValue = value; }
        }

        public object[] GetArguments()
        {
            return _eventArgs.GetArguments();
        }
    }
}
